import java.util.*;

public class StringCounter
{
    public static void main(String[] args)
    {
        Map<String, Integer> count = new HashMap<>();
        for (int i = 0; i < args.length; i++)
        {
            if (!count.containsKey(args[i]))
            {
                count.put(args[i], 1);
            }
            else
            {
                count.put(args[i], count.get(args[i]) + 1);
            }
        }
        Iterator<Map.Entry<String, Integer>> iterator = count.entrySet().iterator();
        while (iterator.hasNext())
        {
            Map.Entry<String, Integer> entry = iterator.next();
            System.out.println(entry.getKey() + "=" + entry.getValue());
        }
    }
}
